<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="News.entity.User" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/12/13 0013
  Time: 14:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>el表达式</title>
</head>
<body>
<%
    request.setAttribute("name","wsq");
    Map map=new HashMap(){{
        put("name","WSQ");
        put("age","21");
    }};
    request.setAttribute("info",map);

    User user=new User();
    user.setUsername("WSQ");
    user.setPassword("123");
    request.setAttribute("entity",user);

    request.setAttribute("i",1);
    request.setAttribute("j",2);

    request.setAttribute("a",null);
    request.setAttribute("b",1);
%>
<div>name:${name}</div>
<div>info.age:${info.age}</div>
<div>info["age"]:${info["age"]}</div>
<div>username:${entity.username}</div>
<div>password:${entity.password}</div>

<div>i==j:${i==j}</div>
<div>i>j:${i>j}</div>
<div>i==1&&j==2:${i==1&&j==2}</div>
<div>empty a:${empty a}</div>
<div>!empty a:${!empty a}</div>
<div>empty b:${empty b}</div>
<div>!empty b:${!empty b}</div>



</body>
</html>
